using System.Collections;
using System.Collections.Generic;
using UnityEngine;


namespace TowerDefence
{
    public class EnemyManager
    {
        public const string EnemyPath = "Model/Role/";

        public static Enemy CreateEnemy(EnemyInfo info,List<Vector3> path)
        {
            GameObject obj=Resources.Load<GameObject>(EnemyPath+info.ModelName);
            GameObject enemy=GameObject.Instantiate(obj);
           Enemy en= enemy.AddComponent<Enemy>();
           en.InitData(path,info.Hp,info.MoveSpeed);
            return en;
        }
    }
}

